﻿{extend name="public:base" /}

{block name='css'}
<link href="__ADMIN__/css/plugins/summernote/summernote-bs4.css" rel="stylesheet">
{/block}

{block name="content"}

<!-- 富文本样式 -->
<style>
  .note-editor.note-frame .note-editing-area .note-editable{
    padding: 10px;
    overflow: auto;
    color: #000;
    word-wrap: break-word;
    background-color: #fff;
    height: 600px;
  }
</style>

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">菜单名</label>
                                <div class="col-sm-3">
                                    <input type="text" placeholder="请输入菜单名" class="form-control" name="name" value="{$info.name}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        {if (input('level') == 2)}
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">图标</label>
                                <div class="col-sm-3">
                                    <input type="text" placeholder="不填默认为列表图标" class="form-control" name="icon" value="{$info.icon}">
                                    <span class="form-text m-b-none">图标请到<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3695327&keyword=&project_type=&page=" target="_blank">阿里巴巴矢量图标库</a>复制图标对应的class，如 ：<span style="color: red">icon-list</span></span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}

                        {if (input('level') == 3 || input('level') == 4)}
                        <div>
                            <div class="form-group  row">
                                <label class="col-sm-1 col-form-label">URL</label>
                                <div class="col-sm-3">
                                    <input type="text" name="url" class="form-control" placeholder="请输入URL" value="{$info.url}">
                                    <span class="form-text m-b-none">/模块名/控制器名/方法名  ==> 例：/admin/manage/userList</span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}

                        <div>
                            <div class="form-group  row">
                                <label class="col-sm-1 col-form-label">排序</label>
                                <div class="col-sm-3">
                                    <input type="number" name="sort" class="form-control" placeholder="请输入排序" value="{$info.sort}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        {if (input('level') < 4)}
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">显示/隐藏
                                <small class="text-navy"></small></label>
                                <div class="col-sm-3">
                                    <div class="i-checks"><label> <input type="radio" value="1" {$info['is_show'] != 2 ? 'checked' : ''} name="is_show"> 显示 </label></div>
                                    <div class="i-checks"><label> <input type="radio" value="2" {$info['is_show'] == 2 ? 'checked' : ''} name="is_show"> 隐藏 </label> </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}

                        <input type="hidden" name="id" value="{:input('id')}" />
                        <input type="hidden" name="level" value="{:input('level')}" />

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}
